package IO;

import java.io.File;
import java.io.IOException;

public class IODemo3 {
    public static void main(String[] args) throws IOException {
        File file1 = new File("./test");
        file1.mkdir();
        File file2 = new File("./testIO");
        file1.renameTo(file2);// 将file1创建的文件夹名字改成file2

        file2.delete();
        file1.delete();
    }
}
